package com.en.sharing.enums;

/**
 * 运算
 *
 * @author 付晓飞
 * @date 2024/3/12 8:14 下午
 */
public enum OperateEnum implements IOperate {

    /**
     * 加、减、乘、除
     */
    PLUS{
        @Override
        public Number operate(Number t1, Number t2) {
            return t1.longValue() + t2.longValue();
        }
    },
    REDUCE{
        @Override
        public Number operate(Number t1, Number t2) {
            return t1.longValue() + t2.longValue();
        }
    },
    MULTIPLY{
        @Override
        public Number operate(Number t1, Number t2) {
            return t1.longValue() + t2.longValue();
        }
    },
    DIVIDE{
        @Override
        public Number operate(Number t1, Number t2) {
            return t1.longValue() + t2.longValue();
        }
    }
    ;



    @Override
    public abstract Number operate(Number t1, Number t2);


}
